package org.dendy.app.ssh;

import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class OpenShell {

	Shell shell = null;

	ButtonToggle toggle = null;

	void createShellOpen(Display display) {
		shell = new Shell(display);
		shell.setLayout(new FillLayout());
		shell.setLayout(new GridLayout(1, false));
		shell.setText("Shutdown Server");
		CLabel text = new CLabel(shell, SWT.CENTER);
		/* Masukan IP Anda */
		text.setText("IP Address : 192.168.0.101");
	}

	public Shell open(Display display) {
		createShellOpen(display);

		toggle = new ButtonToggle(shell);
		toggle.buttonOff();
		toggle.buttonReboot();
		shell.open();
		shell.setSize(400, 200);
		return shell;
	}

}
